package com.itheima.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author yan.zhou
 * @date 2022/1/22
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResultData {

    private Integer code;
    private Object data;
    private String message;


    public static ResultData ok(Object data,String message ){
        return new ResultData(200,data,message);
    }

    public static ResultData error(String message){
        return new ResultData(1000, message, null);
    }

    public static ResultData notLogin(){
        return new ResultData(9998, "未登录，不允许操作！", null);
    }




}
